<ion-header class="ion-no-border ion-no-shadow">
	<ion-toolbar>
		<ion-buttons slot="start">
			<ion-back-button></ion-back-button>
		</ion-buttons>
		<ion-title>{{ 'CONTACTS_PAGE.CONTACT' | translate }}</ion-title>
	</ion-toolbar>
</ion-header>

<ion-content class="ion-padding">
	<form [formGroup]="formGroup">
		<ion-item class="mb-4">
			<ion-label position="floating">{{ 'NAME' | translate }}</ion-label>
			<ion-input
				type="text"
				name="name"
				formControlName="name"
			></ion-input>
		</ion-item>

		<input-address
			formControlName="address"
			[showContactButton]="false"
			(inputAddressQRCodeClick)="scanQRCode()"
		></input-address>
	</form>
</ion-content>

<ion-footer class="ion-padding text-center ion-no-border ion-no-shadow">
	<ion-button [disabled]="!formGroup.valid" (click)="submitForm()"
		>{{ 'SAVE' | translate }}</ion-button
	>
</ion-footer>

<qr-scanner (success)="onScanQRCode($event)" #qrScanner></qr-scanner>
